package com.zk.shop.service.impl;

import com.github.pagehelper.PageHelper;
import com.zk.shop.mapper.MenuMapper;
import com.zk.shop.pojo.Menu;
import com.zk.shop.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class MenuServiceImpl implements MenuService {

    @Autowired
    MenuMapper menuMapper;

    @Override
    public List<Menu> getAllMenu(Integer page,Integer size) {
        PageHelper.startPage(page,size);
        return menuMapper.getAllMenu();
    }
}
